Skip to content

Conversation

tehniss-nenad
Copy link

Before this patch, the application hangs if you do not close the array or string in array. For example "['val1','val2','val3]" or "['val1','val2','val3'"

Before this patch, the application hangs if you do not close the array or string in array. For example "['val1','val2','val3]" or "['val1','val2','val3'"
@Nick-vanGemeren
Copy link

Fine as far as it goes, although I would have rewritten the wholeIfas aSelect Case.

ButParseObjecthas the same issue. Both issues (and maybe others) can be solved by testing injson_SkipSpaces:

Private Sub json_SkipSpaces(json_String As String, ByRef json_Index As Long)
    ' Increment index to skip over spaces
    Do While VBA.Mid$(json_String, json_Index, 1) = " "
        json_Index = json_Index + 1
    Loop
    If json_Index > VBA.Len(json_String) Then
        Err.Raise 10001, "JSONConverter", json_ParseErrorMessage(json_String, _
             json_Index, "Unexpected end of input string - missing terminator?")
    End If
End Sub

@tehniss-nenad
Copy link
Author

I agree, json_SkipSpaces is better place.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants